package org.pangu.test.listener;

/**
 * @author zhangyj
 * @date 2022/7/13 23:34
 */
public class EventTestMain {
    public static void main(String[] args) {
        ListenerSupport support = new ListenerSupport();//监听器管理器
        Listener listener1 = new Listener1();//监听器
        Listener listener2 = new Listener2();
        support.addListener(listener1);
        support.addListener(listener2);

        Event event = new Event("dataA", "typeA");//事件， dataA-事件源

        support.triggerEvent(event);
    }
}
